package mysql

import "gorm.io/gorm"

type Products struct {
	gorm.Model
	Name   string  `json:"name" gorm:"type:varchar(20);not null;comment:产品名称"`
	Cate   string  `json:"cate" gorm:"type:varchar(20);not null;comment:产品分类"`
	Cost   float64 `json:"cost" gorm:"type:decimal(10,2);not null;comment:成本价格"`
	Market float64 `json:"market" gorm:"type:decimal(10,2);not null;comment:市场价格"`
	Image  string  `json:"image" gorm:"type:varchar(300);not null;comment:图片"`
	UserId int     `json:"user_id"  gorm:"type:int(10);not null;comment:用户ID"`
}

type Categories struct {
	gorm.Model
	Name    string `json:"name" gorm:"type:varchar(20);not null;comment:分类名称"`
	Image   string `json:"image" gorm:"type:varchar(300);not null;comment:图片"`
	Profile string `json:"profile" gorm:"type:varchar(60);not null;comment:描述"`
	UserId  int    `json:"user_id"  gorm:"type:int(10);not null;comment:用户ID"`
}
